package com.example.bills;

import android.app.ActionBar;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageButton;

import com.example.finalapp.R;
import com.example.finalapp.SplitActionBarActivity;

public class BillsActivity extends SplitActionBarActivity 
{
	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_bills);

		ActionBar actionBar = getActionBar();
		actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);

		actionBar.setCustomView(R.layout.action_bills);
		final ImageButton addButtonCustom = (ImageButton)findViewById(R.id.addBtn);
		
		addButtonCustom.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) 
			{
				// Switching to Edit New Bill screen
				Intent intent = new Intent(BillsActivity.this, Edit_new_billActivity.class);
				startActivity(intent);
			}
		});
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		super.onCreateOptionsMenu(menu);
		getMenuInflater().inflate(R.menu.bills, menu);
		return true;
	}
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch(item.getItemId())
		{
		
		}
		return super.onOptionsItemSelected(item);
	}
	//Global On click listener for all views
	/*final OnClickListener mGlobal_OnClickListener = new OnClickListener() 
	{
	    public void onClick(final View v) {
	        switch(v.getId())
	        {
	            case R.id.addBtn:
	            break;
	            case R.id.button2:
	            break;
	        }
	    }
	};*/
	
}

